home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_name != "shipWARP2")
- {
- if(_currentframe == 1)
- {
- if(began == 0)
- {
- _Y = _Y + 3;
- if(_Y > 100)
- {
- began = 1;
- }
- }
- else
- {
- xspeed = speed * Math.sin((_rotation * -1 + 180) * 0.017453292519943295);
- yspeed = speed * Math.cos((_rotation * -1 + 180) * 0.017453292519943295);
- _X = _X + xspeed;
- _Y = _Y + yspeed;
- if(wp._currentframe == 3)
- {
- _X = _X + 100 * Math.sin((_rotation * -1 + 180) * 0.017453292519943295);
- _Y = _Y + 100 * Math.cos((_rotation * -1 + 180) * 0.017453292519943295);
- }
- if(wp._currentframe == 1)
- {
- _rotation = _rotation + rspeed * speed;
- }
- xx = random(10);
- if(xx == 0)
- {
- rspeed *= -1;
- }
- xx = random(100);
- if(xx == 0)
- {
- speed = 14;
- rspeed = 1.2;
- timer = 100 + random(50);
- }
- ww = random(50);
- if(ww == 0)
- {
- wp.play();
- }
- timer -= 1;
- if(timer == 0)
- {
- speed = 7;
- rspeed = 0.6;
- }
- yy = random(75);
- if(yy == 0)
- {
- _root.fire2(this);
- }
- if(_X < rad)
- {
- _rotation = -1 * _rotation;
- _X = rad;
- }
- if(_X > 550 - rad)
- {
- _rotation = -1 * _rotation;
- _X = 550 - rad;
- }
- if(_Y > 400 - rad)
- {
- _rotation = -1 * _rotation + 180;
- _Y = 400 - rad;
- }
- if(_Y < rad)
- {
- _rotation = -1 * _rotation + 180;
- _Y = rad;
- }
- if(_root.ship.sh.hitTest(wp.sh.harea))
- {
- _root.ship.play();
- }
- }
- var i = 0;
- while(i <= 20)
- {
- if(wp.sh.harea.hitTest(_root["hmn" + i]))
- {
- life -= _root["hmn" + i].dmg;
- wp.sh.play();
- removeMovieClip(_root["hmn" + i]);
- }
- i++;
- }
- if(life <= 0)
- {
- play();
- }
- }
- if(_root.rem == true)
- {
- removeMovieClip(this);
- }
- }
- }
-